<!DOCTYPE html>
<meta charset="utf-8">
<#include "../../business/common/common.ftl"/>

<style>
    div {
        overflow: scroll;
    }

</style>
<div class="layui-fluid">
    <table class="layui-table table" style="text-align: center;font-size: 10px" id="dataTable" tableType="dataTable">
        <tr class="layui-bg-gray">
            <th style="text-align: center;" rowspan="3">序号</th>
            <th style="text-align: center;" colspan="3">基础信息</th>
            <th style="text-align: center;" colspan="27">选房情况</th>
        </tr>
        <tr class="layui-bg-gray">
            <th style="text-align: center;" colspan="3">征迁安置情况</th>
            <th style="text-align: center;" colspan="2">小户型</th>
            <th style="text-align: center;" colspan="14">普通型</th>
            <th style="text-align: center;" colspan="2">复式</th>
            <th style="text-align: center;" colspan="2">房源合计</th>
            <th style="text-align: center;" colspan="2">店铺</th>
            <th style="text-align: center;" colspan="2">储物间</th>
            <th style="text-align: center;" colspan="3">车位数</th>
        </tr>
        <tr class="layui-bg-gray">
            <th style="text-align: center;">项目名称</th>
            <th style="text-align: center;">项目开始年份</th>
            <th style="text-align: center;">户数</th>
            <th style="text-align: center;">一室(套)</th>
            <th style="text-align: center;">面积(㎡)</th>
            <th style="text-align: center;">一室二厅(套)</th>
            <th style="text-align: center;">面积(㎡)</th>
            <th style="text-align: center;">二室二厅(套)</th>
            <th style="text-align: center;">面积(㎡)</th>
            <th style="text-align: center;">三室二厅(套)</th>
            <th style="text-align: center;">面积(㎡)</th>
            <th style="text-align: center;">三室三厅(套)</th>
            <th style="text-align: center;">面积(㎡)</th>
            <th style="text-align: center;">四室二厅(套)</th>
            <th style="text-align: center;">面积(㎡)</th>
            <th style="text-align: center;">五室二厅(套)</th>
            <th style="text-align: center;">面积(㎡)</th>
            <th style="text-align: center;">数量(套)</th>
            <th style="text-align: center;">面积(㎡)</th>
            <th style="text-align: center;">复式(套)</th>
            <th style="text-align: center;">面积(㎡)</th>
            <th style="text-align: center;">数量(套)</th>
            <th style="text-align: center;">面积(㎡)</th>
            <th style="text-align: center;">数量(套)</th>
            <th style="text-align: center;">面积(㎡)</th>
            <th style="text-align: center;">数量(套)</th>
            <th style="text-align: center;">面积(㎡)</th>
            <th style="text-align: center;">普通车位</th>
            <th style="text-align: center;">人防车位</th>
            <th style="text-align: center;">车位合计</th>

        </tr>
    <#assign index = 0/>
    <#assign allContractCountSum = 0/>
    <#assign allMoreCountSum = 0/>
    <#assign allMoreMoneySum = 0/>
    <#assign allLessCountSum = 0/>
    <#assign allLessMoneySum = 0/>
    <#assign allFinalMoneySum = 0/>
    <#assign allSmallHouseCountSum = 0/>
    <#assign allSmallHouseAreaSum = 0/>
    <#assign all0100HouseCountSum = 0/>
    <#assign all0100HouseAreaSum = 0/>
    <#assign all0102HouseCountSum = 0/>
    <#assign all0102HouseAreaSum = 0/>
    <#assign all0202HouseCountSum = 0/>
    <#assign all0202HouseAreaSum = 0/>
    <#assign all0302HouseCountSum = 0/>
    <#assign all0302HouseAreaSum = 0/>
    <#assign all0303HouseCountSum = 0/>
    <#assign all0303HouseAreaSum = 0/>
    <#assign all0402HouseCountSum = 0/>
    <#assign all0402HouseAreaSum = 0/>
    <#assign all0502HouseCountSum = 0/>
    <#assign all0502HouseAreaSum = 0/>
    <#assign allNormalHouseCountSum = 0/>
    <#assign allNormalHouseAreaSum = 0/>
    <#assign allFsHouseCountSum = 0/>
    <#assign allFsHouseAreaSum = 0/>
    <#assign allHouseCountSum = 0/>
    <#assign allHouseAreaSum = 0/>

    <#assign allShopHouseCountSum = 0/>
    <#assign allShopHouseAreaSum = 0/>
    <#assign allStorageRoomCountSum = 0/>
    <#assign allStorageRoomAreaSum = 0/>
    <#assign allCarLotCountSum = 0/>
    <#assign allPtCarLotCountSum = 0/>
    <#assign allRfCarLotCountSum = 0/>

    <#if zsProjectList?size !=0>
        <#list zsProjectList as zsProject>
            <#assign houseCountMap = (resultMap[(zsProject.id)?c])!/>
            <#assign storageRoomCountMap = (storageRoomMap[(zsProject.id)?c])!/>
            <#assign shopHouseCountMap = (shopHouseMap[(zsProject.id)?c])!/>
            <#assign carLotCountMap = (carLotMap[(zsProject.id)?c])!/>

            <#assign allContractCountSum = allContractCountSum + houseCountMap['contractCount']/>
            <#assign allSmallHouseCountSum = allSmallHouseCountSum + houseCountMap['smallHouseNum']/>
            <#assign allSmallHouseAreaSum = allSmallHouseAreaSum + houseCountMap['smallHouseArea']/>
            <#assign all0102HouseCountSum = all0102HouseCountSum + houseCountMap['0102HouseNum']/>
            <#assign all0102HouseAreaSum = all0102HouseAreaSum + houseCountMap['0102HouseArea']/>
            <#assign all0202HouseCountSum = all0202HouseCountSum + houseCountMap['0202HouseNum']/>
            <#assign all0202HouseAreaSum = all0202HouseAreaSum + houseCountMap['0202HouseArea']/>
            <#assign all0302HouseCountSum = all0302HouseCountSum + houseCountMap['0302HouseNum']/>
            <#assign all0302HouseAreaSum = all0302HouseAreaSum+ houseCountMap['0302HouseArea']/>
            <#assign all0303HouseCountSum = all0303HouseCountSum + houseCountMap['0303HouseNum']/>
            <#assign all0303HouseAreaSum = all0303HouseAreaSum+ houseCountMap['0303HouseArea']/>
            <#assign all0402HouseCountSum = all0402HouseCountSum + houseCountMap['0402HouseNum']/>
            <#assign all0402HouseAreaSum = all0402HouseAreaSum + houseCountMap['0402HouseArea']/>
            <#assign all0502HouseCountSum = all0502HouseCountSum + houseCountMap['0502HouseNum']/>
            <#assign all0502HouseAreaSum = all0502HouseAreaSum + houseCountMap['0502HouseArea']/>
            <#assign allNormalHouseCountSum = allNormalHouseCountSum + houseCountMap['normalHouseNum']/>
            <#assign allNormalHouseAreaSum = allNormalHouseAreaSum + houseCountMap['normalHouseArea']/>
            <#assign allFsHouseCountSum = allFsHouseCountSum + houseCountMap['fsHouseNum']/>
            <#assign allFsHouseAreaSum = allFsHouseAreaSum + houseCountMap['fsHouseArea']/>
            <#assign allHouseCountSum = allHouseCountSum + houseCountMap['houseNum']/>
            <#assign allHouseAreaSum = allHouseAreaSum + houseCountMap['houseArea']/>
            <#assign allShopHouseCountSum = allShopHouseCountSum + (shopHouseCountMap['shopHouseNum'])!0/>
            <#assign allShopHouseAreaSum = allShopHouseAreaSum + (shopHouseCountMap['shopHouseArea'])!0/>
            <#assign allStorageRoomCountSum = allStorageRoomCountSum + (storageRoomCountMap['storageRoomNum'])!0/>
            <#assign allStorageRoomAreaSum = allStorageRoomAreaSum + (storageRoomCountMap['storageRoomArea'])!0/>
            <#assign allCarLotCountSum = allCarLotCountSum + (carLotCountMap['carLotNum'])!0/>
            <#assign allPtCarLotCountSum = allPtCarLotCountSum + (carLotCountMap['ptCarLotNum'])!0/>
            <#assign allRfCarLotCountSum = allRfCarLotCountSum + (carLotCountMap['rfCarLotNum'])!0/>
            <#assign index = index+1 />

            <tr <#if index%10 lte 5 && index%10 gt 0>style="background-color: #FFCC99"</#if>>
                <td>${index}</td>
                <td>${(zsProject.projectName)!}</td>
                <td>${(zsProject.startYear?string('yyyy年MM月'))!}</td>
                <td><a href="contractShow.ftl?yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['contractCount']}</td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=02&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['smallHouseNum']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=02&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['smallHouseArea']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=01&houseHold=0102&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['0102HouseNum']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=01&houseHold=0102&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['0102HouseArea']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=01&houseHold=0202&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['0202HouseNum']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=01&houseHold=0202&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['0202HouseArea']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=01&houseHold=0302&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['0302HouseNum']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=01&houseHold=0302&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['0302HouseArea']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=01&houseHold=0303&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['0303HouseNum']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=01&houseHold=0303&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['0303HouseArea']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=01&houseHold=0402&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['0402HouseNum']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=01&houseHold=0402&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['0402HouseArea']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=01&houseHold=0502&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['0502HouseNum']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=01&houseHold=0502&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['0502HouseArea']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=01&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['normalHouseNum']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=01&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['normalHouseArea']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=03&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['fsHouseNum']}</a></td>
                <td>
                    <a href="selectedHouseShow.ftl?houseType=03&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['fsHouseArea']}</a></td>
                <td><a href="selectedHouseShow.ftl?yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['houseNum']}</a></td>
                <td><a href="selectedHouseShow.ftl?yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${houseCountMap['houseArea']}</a></td>
                <td>
                    <a href="selectedShopHouseShow.ftl?yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${(shopHouseCountMap['shopHouseNum'])!0}</a></td>
                <td>
                    <a href="selectedShopHouseShow.ftl?yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${(shopHouseCountMap['shopHouseArea'])!0}</a></td>
                <td>
                    <a href="selectedStorageRoomShow.ftl?yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${(storageRoomCountMap['storageRoomNum'])!0}</a></td>
                <td>
                    <a href="selectedStorageRoomShow.ftl?yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${(storageRoomCountMap['storageRoomArea'])!0}</a></td>
                <td>
                    <a href="selectedCarLotShow.ftl?carLotType=1,2,3&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${(carLotCountMap['ptCarLotNum'])!0}</a></td>
                <td>
                    <a href="selectedCarLotShow.ftl?carLotType=4,5,6&yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${(carLotCountMap['rfCarLotNum'])!0}</a></td>
                <td><a href="selectedCarLotShow.ftl?yearStr=${yearStr}&townCode=${townCode}&zsProjectId=${zsProject.id}"
                       style="font: inherit">${(carLotCountMap['carLotNum'])!0}</a></td>
            </tr>

        </#list>
    </#if>
        <tr bgcolor="#b0c4de">
            <td colspan="3">合计</a></td>
            <td><a href="contractShow.ftl?yearStr=${yearStr}&townCode=${townCode}"
                   style="font: inherit">${allContractCountSum}</td>
            <td><a href="selectedHouseShow.ftl?houseType=02&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${allSmallHouseCountSum}
            </td>
            <td>
                <a href="selectedHouseShow.ftl?houseType=02&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${allSmallHouseAreaSum}
            </td>
            <td>
                <a href="selectedHouseShow.ftl?houseHold=0102&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${all0102HouseCountSum}
            </td>
            <td>
                <a href="selectedHouseShow.ftl?houseHold=0102&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${all0102HouseAreaSum}
            </td>
            <td>
                <a href="selectedHouseShow.ftl?houseHold=0202&houseType=01&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${all0202HouseCountSum}
            </td>
            <td>
                <a href="selectedHouseShow.ftl?houseHold=0202&houseType=01&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${all0202HouseAreaSum}
            </td>
            <td>
                <a href="selectedHouseShow.ftl?houseHold=0302&houseType=01&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${all0302HouseCountSum}
            </td>
            <td>
                <a href="selectedHouseShow.ftl?houseHold=0302&houseType=01&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${all0302HouseAreaSum}
            </td>
            <td>
                <a href="selectedHouseShow.ftl?houseHold=0303&houseType=01&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${all0303HouseCountSum}
            </td>
            <td>
                <a href="selectedHouseShow.ftl?houseHold=0303&houseType=01&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${all0303HouseAreaSum}
            </td>
            <td>
                <a href="selectedHouseShow.ftl?houseHold=0402&houseType=01&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${all0402HouseCountSum}
            </td>

            <td>
                <a href="selectedHouseShow.ftl?houseHold=0402&houseType=01&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${all0402HouseAreaSum}
            </td>
            <td>
                <a href="selectedHouseShow.ftl?houseHold=0502&houseType=01&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${all0502HouseCountSum}
            </td>

            <td>
                <a href="selectedHouseShow.ftl?houseHold=0502&houseType=01&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${all0502HouseAreaSum}
            </td>
            <td>
                <a href="selectedHouseShow.ftl?houseType=01&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${allNormalHouseCountSum}
            </td>
            <td>
                <a href="selectedHouseShow.ftl?houseType=01&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${allNormalHouseAreaSum}
            </td>
            <td>
                <a href="selectedHouseShow.ftl?houseType=03&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${allFsHouseCountSum}
            </td>
            <td>
                <a href="selectedHouseShow.ftl?houseType=03&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${allFsHouseAreaSum}
            </td>
            <td><a href="selectedHouseShow.ftl?townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${allHouseCountSum}</td>
            <td><a href="selectedHouseShow.ftl?townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${allHouseAreaSum}</td>
            <td><a href="selectedShopHouseShow.ftl?townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${allShopHouseCountSum}</td>
            <td><a href="selectedShopHouseShow.ftl?townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${allShopHouseAreaSum}</td>
            <td><a href="selectedStorageRoomShow.ftl?townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${allStorageRoomCountSum}</td>
            <td><a href="selectedStorageRoomShow.ftl?townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${allStorageRoomAreaSum}</td>
            <td><a href="selectedCarLotShow.ftl?carLotType=1,2,3&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${allPtCarLotCountSum}</td>
            <td><a href="selectedCarLotShow.ftl?carLotType=4,5,6&townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${allRfCarLotCountSum}</td>
            <td><a href="selectedCarLotShow.ftl?townCode=${townCode}&yearStr=${yearStr}"
                   style="font: inherit">${allCarLotCountSum}</td>
        </tr>
    </table>
</div>

